package fair.controller;

import com.alibaba.dubbo.config.annotation.Reference;
import fair.service.HelloService;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @author fair_wu
 * @version v1.0
 * @package fair.controller
 * @date 2021-01-14 上午 11:31
 */
@Controller
@RequestMapping("/hello")
public class HelloController {

    @Reference
    private HelloService helloService;

    @RequestMapping("sayHello")
    @ResponseBody
    public String sayHello(String name) {
        return helloService.sayHello(name);
    }
}
